


#define TONY “Grading.”

by gravityassist



Category: Iron Man - All Media Types, Marvel, Marvel Cinematic Universe
Genre: Gen, Gift Fic, Grading, OMC pov, Programming, SCIENCE!, The Author Regrets Nothing, Young!Tony, grad school!Tony, undergrads
Language: English
Status: Completed
Published: 2013-03-06
Updated: 2013-03-06
Packaged: 2017-12-04 12:24:18
Rating: General Audiences
Warnings: No Archive Warnings Apply
Chapters: 1
Words: 1,500
Publisher: archiveofourown.org
Story URL: https://archiveofourown.org/works/710749
Author URL: https://archiveofourown.org/users/gravityassist/pseuds/gravityassist
Summary: <blockquote class="userstuff">
              <p>Waiting for code to compile is boring but, grading papers is hell.</p>
            </blockquote>





	#define TONY “Grading.”

**Author's Note:**

  * For [antigrav_vector (Morellian)](https://archiveofourown.org/gifts?recipient=antigrav_vector+%28Morellian%29).



> This fic is a gift for  antigrav_vector  as a distraction from the grading of papers and a looming Thesis defense. The code in this fic will be in bold text so that it will be easy to differentiate from the story text. 
> 
> Disclaimer: Un-beta’d because it is a gift for my Beta. Read at your own risk. Additionally, no grad students or undergrads were hurt in the making of this fic.

**#!/bin/bash**

**#**

**# "permeability.sh"  RSM 02/22/1990**

**#**

**# @  
**

There was a pair of eyes looking over his shoulder from across the aisle; he could feel them boring a hole in the back of his skull. There was only a matter of time until he heard impending loud, dramatic sigh. Damn, that kid coded like a fiend and the compiling was an inevitable irritation that always came sooner rather than later.  It never ceased to amaze him the mind that this kid has at sixteen and for some, unfathomable reason the kid loved to harass him the most out of everyone in the lab.

**temperatures="323 358"                    # Set temperature directories.**

**conc="0 5 10 20 30 40 50 60 70 80 90 100" # Set concentration directories.  
**

“Ugh, Rob, I’m bored.”

 _There it is._ He resisted the urge to bash his head against the screen in front of him; it was way too late at night and way too early into this code for him to have the patience for this, “Yeah?”

**timestep="250 500 750 1000 1250 1500 1750 2000 2250 2500 2750 3000**

The kid’s chair squeaked as he rolled over to Rob’s desk and spun around slowly. “Compiling is just so boring.”

**3250 3500 3750 4000 4250 4500 4750 5000 5250 5500 5750 6000 6250 6500 6750 7000 7250 7500 7750 8000 8250 8500 8750 9000 9250 9500 9750 10000 10250 10500 10750 11000 11250 11500 11750 12000 12250 12500 12750 13000 13250 13500 13750 14000 14250 14500 14750 15000 15250 15500**

“Yes, that is the way programming works, Tony,” Rob sighed and looked over at Tony who was balancing a pencil on his upper lip. His jet-black hair was sticking out in multiple directions and his clothes looked like he wore them for three days straight. _Jeeze, you would think the kid of Howard Stark would at least…._ Rob had to stop that unfair train of thought; Comparing the kid to his father was just cruel considering he seemed to be the only one who noticed the look on Tony’s face when his father was mentioned; an expression that had always bothered him. He ran his hands through his hair, “Why don’t you go work on your robot?”

“Can’t. The code for his new hardware is compiling now.” Tony tilted his head all the way back over the chair as he looked at the robot arm at the far end of the room. It was a mess of wires and metal and it seemed to bring a look of contentment on the kid’s face.

**15750 16000 16250 16500 16750 17000 17250 17500 17750 18000 18250 18500 18750 19000 19250 19500 19750 20000 20250 20500 20750 21000 21250 21500 21750 22000 22250 22500 22750 23000 23250 23500 23750 24000 24250 24500 24750 25000 25250 25500 25750 26000 26250 26500 26750 27000 27250 27500 27750 28000 28250 28500 28750 29000 29250 29500 29750 30000"**

“What about working on your thesis?”

**for a in $temperatures; do      # Cycle through temperature.**

“Psh,” Tony scoffed and began spinning the chair again, “I don’t feel like it.”

**for b in $conc; do           # Cycle through concentrations.**

**for c in $timestep; do # Cycle through timesteps.  
**

“Well, then I don’t know how to help you.” **  
**

**# Find average upper position of membrane by averaging the position of the**

**# N4 atom group on the sphingomylein molecule.  
**

“Can’t I just watch you code?”

“No.” 

**sgmlconc=`echo 100-$b | bc -l`        # Sphingomylein percent concentration.  
**

“Rob, man, you are killing me here.” **  
**

**sgmlposup=`grep 'SGML    N4'**

“Alright,” he turned in his chair and reached for a pile of papers just beyond the stack of empty coffee cups and candy bar wrappers and pulled full manila folder from the top. “If you want something to do: here, this is homework set three which needs to be graded for tomorrow.” 

“Are you serious? You are going to try to pawn that off on me? It isn’t even my week to grade.”

 “Look, beggars can’t be choosers. Anyway, if you cannot already tell, I am busy and cannot get to it at this moment.” Tony leveled him with a glare. _Okay, yeah, I am taking advantage of him._ Rob raked his hands up and down his face and then through his hair, his settled his on Tony, “How about this: if you can finish the grading by time I am done writing and debugging this code, I will help you with that component you have been asking Marty to help you with for a month.” 

“Fine,” Tony conceded after a moment of consideration. “You renege and there will be consequences.” 

“Understood. Oh, and be sure to make the corrections comprehensible this time. I was fending them off with only a coffee mug and pens at office hours the last time.” 

“Yeah, yeah." Tony stood abruptly and stretched. Taking the folder with him, he  walked over to the far side of the room and sat next to the robot prototype.

**../../$a/$b/Trajectory_Archive/$c/start.gro | head -$sgmlconc | awk '{print x+=$6}' | tail -1`**

**sgmlaveposup=`echo $sgmlposup/$sgmlconc | bc -l 2 > /dev/null`  
**

“Huh. Okay. Well, that’s not too bad.” **  
**

**# Find average upper position of membrane by averaging the position of the**

**# N5 atom group on the ceramide molecule.  
**

**cerposup=`grep 'CER6    N5' ../../$a/$b/Trajectory_Archive/$c/start.gro | head -$b | awk '{print x+=$6}' | tail -1`**

**ceraveposup1=`echo $cerposup/$b | bc -l 2 > /dev/null`  
**

**# If statements ensures proper format for bc calculator.  
**

“What? What is… Oh, I see what you did there. Eh, that’s passable.” **  
**

**if [ ! -z $ceraveposup ]**

**then**

**ceraveposup=`echo +$ceraveposup1`**

**fi  
**

**if [ -z $sgmlaveposup ]**

**then**

**ceraveposup=`echo $ceraveposup1*2`**

**fi  
**

**if [ -z $ceraveposup ]**

**then**

**sgmlaveposup=`echo $sgmlaveposup*2`**

**fi**

**# Find average lower position of membrane using same method for finding upper.**

“Huh, not too bad for an undergrad.”

**sgmlposdown=`grep 'SGML    N4' ../../$a/$b/Trajectory_Archive/$c/start.gro | tail -$sgmlconc | awk '{print x+=$6}' | tail -1`**

**sgmlaveposdown=`echo $sgmlposdown/$sgmlconc | bc -l 2 > /dev/null`**

**cerposdown=`grep 'CER6    N5' ../../$a/$b/Trajectory_Archive/$c/start.gro | tail -$b | awk '{print x+=$6}' | tail -1`**

**ceraveposdown1=`echo $cerposdown/$b | bc -l 2 > /dev/null`  
**

“Tell me this is not real. How in the hell did you make it into MIT?  It is called calculus, use it.” **  
**

**if [ ! -z $ceraveposdown ]**

**then**

**ceraveposdown=`echo +$ceraveposdown1`**

**fi**

**if [ -z $sgmlaveposdown ]**

**then**

**ceraveposdown=`echo $ceraveposdown1*2`**

**fi  
**

**if [ -z $ceraveposdown ]**

**then**

**sgmlaveposdown=`echo $sgmlaveposdown*2`**

**fi  
**

**# Find average center of membrane.**

“What?”

**mmid=`echo -e '\050''\050''\050' $sgmlaveposdown $ceraveposdown '\051'/2'\051'+ '\050''\050' $sgmlaveposup $ceraveposup '\051'/2'\051''\051'/2 | bc -l`  
**

**# Create errata file and membrane middle coordinate file.  
**

**echo $a/$b/$c >> err     **

**# Create SOL z-axis coordinate file and label water molecules as 1 for upper**

**# and 2 for lower.  File stored as SOL_coord.  
**

**awk -v m=$mmid -v t=$c '/SOL     OW/ {print $1, $5, "" t "", "" m ""}' ../../$a/$b/Trajectory_Archive/$c/start.gro | awk '$2 >= $4 {print $1, $2, $3, $4, " 1 "} $2 <= $4 {print $1, $2, $3, $4, " 2 "}' > SOL_coord**

“The hell? Look at this Dummy, I don’t think this is even a programming language. Did they just vomit this out? How the…?”

**# Increment d to next timestep if $c is less than 30000.**

**if [ $c -lt 30000 ]**

**then  
**

**d=`echo $c+250 | bc`**

**# Create SOL z-axis coordinate file for next timestep.  File stored as**

**# SOL_coord2.**

“‘I don’t know’? Well, at least you can acknowledge it...” **  
**

**awk '/SOL     OW/ {printf("%2s %6s\n", $1, $5)}' ../../$a/$b/Trajectory_Archive/$d/start.gro > SOL_coord2  
**

**# Compare positions of z-axis coordinates from both timesteps to see if any**

**# water molecules moved past middle membrane.  File stored as num_H2O_moved.  
**

**awk 'NR==FNR{tmp[NR]=$0}NR!=FNR{print tmp[FNR]$0}' SOL_coord SOL_coord2 | awk '$5 == 1 && $7 < $4 {print $1, $2, $7, $4, $3, "1 -> 2"} $5 == 2 && $7 > $4 {print $1, $2, $7, $4, $3, "1 <\- 2"}' >> num_H2O_moved  
**

“Were you dropping acid when you wrote this? It is correct but, damn…” **  
**

**else**

**break             # End timestep cycle when $c = 30000.**

**fi**

**done                   # End timestep cycle.**

**# Count number of times water molecules moved across membrane.  File stored as**

**# Mem_permeability**

**H2O_moved=`wc -l num_H2O_moved | awk '{print $1}'`**

**echo $a'     '$b'     '$H2O_moved >> Mem_permeability**

**echo -e '\050''\050''\050' $sgmlaveposdown $ceraveposdown  
**

“Finally, someone who know what the hell they are doing! Crap, that’s the key.”

Rob couldn’t contain himself at this point he was about to fall out of his chair laughing, “Well, I’m glad that you think that I know what I am doing.”

“Uuuuuggh, Rob, I can’t do this anymore. My head is killing me,” Tony intoned dramatically as he lay back onto the ground, scattering papers across the floor.

**'\051'/2'\051'+ '\050''\050' $sgmlaveposup $ceraveposup '\051'/2'\051''\051'/2**

**echo -e $a/$b'\t'...completed**

**rm num_H2O_moved**

**done                      # End concentration cycle.**

**done                    # End temperature cycle.  
**

**# Remove temporary files.**   **  
**

**rm SOL_coord SOL_coord2 err**

“Alright, Tony, you can stop grading. Let’s go work on that component.”

“Woo! Get your soldering kit, it’s time to do some science!”

**exit 0**

**Author's Note:**

> I had a lot of fun writing this fic. I hope you enjoyed it. This is the second fanfic I have written for public consumption in quite a while (10 years!? What?!) and was not the one I intended to put up on AO3 first but, damn it was the one what has kidnapped my brain and demanded to be finished and posted first. :)
> 
> In regards to the code... My coding skills are truly terrible and are not fit for anyone’s eyes, unless you want to have a Nazi’s from the ‘Raiders of the Lost Ark’ moment. No one wants that. The code in the fic belongs to a friend of mine who was gracious enough to allow me to use it for this purpose. I left my friend’s initials are left on the code, and the only thing that was changed was the date the code was made to make more sense cannon-wise. If you are interested in knowing what the programming language is and what it actually does, do not hesitate to ask me. :)
> 
> Additionally, if you are interested in learning how to code (or even computer science in general) there are some great free resources for you to pull from, many of which can be found here: www.code.org. I am currently using www.codeacademy.org to learn how to program in Python. It really makes it easy to understand and work through.
> 
> Also, totally check out the free opencourseware that MIT has up (http://ocw.mit.edu/index.htm) and what other university’s have up in iTunesU.


End file.
